package 兔子;

/**
 * @author Administrator
 * @ClassName Rabbit
 * @TIME 星期五 2020/12/25
 */
public class Rabbit {
    public static void main(String[] args) {
        int b = 1;
        //总数
        int sum = 1;
        //一月前总数
        int oneSum = 1;
        int year = 12;

        for (int i = 3;i<=year;i++){
            b = sum+oneSum;
            oneSum = sum;
            sum = b;
            System.out.println("第"+i+"月有"+b+"只兔子");
        }


    }
}
